const express = require('express');
const app = express()
const cors = require('cors');
const corsOptions = require('./config/cors');
const userRouter = require('./router/user');
const fileRouter = require('./router/file');

app.use(express.urlencoded({ extended: false }));
app.use(express.json());
app.use(cors(corsOptions));
app.use(userRouter);
app.use(fileRouter)

app.listen(3000, () => {
    console.log('你好 服务启动成功，端口3000');
});
